/**
 * Copyright (c) 2016-2019 九点科技 All rights reserved.
 *
 * http://www.9dyun.cn
 *
 * 版权所有，侵权必究！
 */
package com.dian.modules.base.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.dian.common.validator.group.AddGroup;
import com.dian.common.validator.group.UpdateGroup;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
        import java.math.BigDecimal;
    import com.dian.common.entity.BaseEntity;
import java.util.Date;
import java.util.List;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
/**
 * 商品资料表
 *
 * @author xiaolai
 * @email xiaolai@9dyun.cn
 * @date 2019-06-10 19:06:22
 */
@Data
@TableName("base_goods")
public class GoodsEntity extends BaseEntity {
        private static final long serialVersionUID = 1L;
        /**
        * 商品货号
        */
        @NotBlank(message="商品货号不能为空",  groups ={AddGroup.class, UpdateGroup.class})
        @Length(max=50,  groups ={AddGroup.class, UpdateGroup.class}, message="商品货号长度不能超过50个字符")
        private String goodsCode;
        /**
        * 商品名称
        */
        @NotBlank(message="商品名称不能为空",  groups ={AddGroup.class, UpdateGroup.class})
        @Length(max=100,  groups ={AddGroup.class, UpdateGroup.class}, message="商品名称长度不能超过100个字符")
        private String goodsName;
        /**
        * 商品型号
        */
        @Length(max=100,  groups ={AddGroup.class, UpdateGroup.class}, message="商品型号长度不能超过100个字符")
        private String goodsModel;
        /**
        * 商品规格
        */
        @NotBlank(message="商品规格不能为空",  groups ={AddGroup.class, UpdateGroup.class})
        @Length(max=100,  groups ={AddGroup.class, UpdateGroup.class}, message="商品规格长度不能超过100个字符")
        private String goodsSpec;
        /**
        * 商品类型:1-普通商品-STAN-;2-组合商品-ASSO;
        */
        @NotNull(message="商品类型不能为空",groups = {AddGroup.class,UpdateGroup.class})
        private Integer goodsType;
        /**
        * 基本计量单位;来源于base_uom.id
        */
        private Long baseUomId;
        /**
        * 基本计量单位;来源于base_uom.uom_name
        */
        @Length(max=50,  groups ={AddGroup.class, UpdateGroup.class}, message="基本计量单位长度不能超过50个字符")
        private String baseUomName;
        /**
        * 库存计量单位;来源于base_uom.id
        */
        private Long qtyUomId;
        /**
        * 库存计量单位;来源于base_uom.uom_name
        */
        @Length(max=50,  groups ={AddGroup.class, UpdateGroup.class}, message="库存计量单位长度不能超过50个字符")
        private String qtyUomName;
        /**
        * 辅助计量单位;来源于base_uom.id
        */
        private Long auxUomId;
        /**
        * 辅助计量单位;来源于base_uom.uom_name
        */
        @Length(max=50,  groups ={AddGroup.class, UpdateGroup.class}, message="辅助计量单位长度不能超过50个字符")
        private String auxUomName;

        /**
         * 库存换算(库存换算)
         */
        @NotNull(message="库存换算不能为空",  groups ={AddGroup.class, UpdateGroup.class})
        private BigDecimal converUnit1;

        /**
         * 辅助换算(辅助换算)
         */
        @NotNull(message="辅助换算不能为空",  groups ={AddGroup.class, UpdateGroup.class})
        private BigDecimal converUnit2;


        /**
        * id路径 /0/
        */
        @NotBlank(message="id路径 /0/不能为空",  groups ={AddGroup.class, UpdateGroup.class})
        @Length(max=200,  groups ={AddGroup.class, UpdateGroup.class}, message="id路径 /0/长度不能超过200个字符")
        private String classPathId;
        /**
        * 名称路径 /上级名称/
        */
        @NotBlank(message="名称路径 /上级名称/不能为空",  groups ={AddGroup.class, UpdateGroup.class})
        @Length(max=200,  groups ={AddGroup.class, UpdateGroup.class}, message="名称路径 /上级名称/长度不能超过200个字符")
        private String classPathName;
        /**
        * 商品分类id;来源于base_class.id
        */
        @NotNull(message="商品分类id不能为空",groups = {AddGroup.class,UpdateGroup.class})
        private Long classId;
        /**
        * 商品分类名称;来源于base_class.class_name
        */
        @NotBlank(message="商品分类名称不能为空",  groups ={AddGroup.class, UpdateGroup.class})
        @Length(max=100,  groups ={AddGroup.class, UpdateGroup.class}, message="商品分类名称长度不能超过100个字符")
        private String className;
        /**
        * 体积
        */
        private BigDecimal volume;
        /**
        * 净重
        */
        private BigDecimal weight;
        /**
        * 整箱数量
        */
        private Integer boxNum;
        /**
        * 网络挂牌价
        */
        private BigDecimal listPrice;
        /**
        * 商品库位
        */
        @Length(max=20,  groups ={AddGroup.class, UpdateGroup.class}, message="商品库位长度不能超过20个字符")
        private String location;
        /**
        * 是否有效:1-启用-NORMAL;2-禁用-DISABLE
        */
        @NotNull(message="是否有效不能为空",groups = {AddGroup.class,UpdateGroup.class})
        private Integer isValid;
        /*
        /**
         * 色号
         */
        //@Length(max=20,  groups ={AddGroup.class, UpdateGroup.class}, message="色号长度不能超过20个字符")
        //private String colorNumber;


        /**
         * 商品等级:1-优等品-excell;2-一等品-first
         */
        //@Length(max=20,  groups ={AddGroup.class, UpdateGroup.class}, message="商品等级长度不能超过20个字符")
        //private String itemGrade;*/
}
